home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / pipnss / nsICMSSecureMessage.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  147 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICMSSecureMessage.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICMSSecureMessage_h__
  6. #define __gen_nsICMSSecureMessage_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIX509Cert; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsICMSSecureMessage */
  21. #define NS_ICMSSECUREMESSAGE_IID_STR "14b4394a-1dd2-11b2-b4fd-ba4a194fe97e"
  22.  
  23. #define NS_ICMSSECUREMESSAGE_IID \
  24.   {0x14b4394a, 0x1dd2, 0x11b2, \
  25.     { 0xb4, 0xfd, 0xba, 0x4a, 0x19, 0x4f, 0xe9, 0x7e }}
  26.  
  27. /**
  28.  * nsICMSManager (service)
  29.  *  Interface to access users certificate store
  30.  */
  31. class NS_NO_VTABLE nsICMSSecureMessage : public nsISupports {
  32.  public: 
  33.  
  34.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICMSSECUREMESSAGE_IID)
  35.  
  36.   /**
  37.    * getCertByPrefID - a BASE64 string representing a user's
  38.    *   certificate (or NULL if there isn't one)
  39.    */
  40.   /* string getCertByPrefID (in string certID); */
  41.   NS_IMETHOD GetCertByPrefID(const char *certID, char **_retval) = 0;
  42.  
  43.   /**
  44.    * decodeCert - decode a BASE64 string into an X509Certificate object
  45.    */
  46.   /* nsIX509Cert decodeCert (in string value); */
  47.   NS_IMETHOD DecodeCert(const char *value, nsIX509Cert **_retval) = 0;
  48.  
  49.   /**
  50.    * sendMessage - send a text message to the recipient indicated
  51.    *   by the base64-encoded cert.
  52.    */
  53.   /* string sendMessage (in string msg, in string cert); */
  54.   NS_IMETHOD SendMessage(const char *msg, const char *cert, char **_retval) = 0;
  55.  
  56.   /**
  57.    * receiveMessage - recieve an encrypted (enveloped) message
  58.    */
  59.   /* string receiveMessage (in string msg); */
  60.   NS_IMETHOD ReceiveMessage(const char *msg, char **_retval) = 0;
  61.  
  62. };
  63.  
  64. /* Use this macro when declaring classes that implement this interface. */
  65. #define NS_DECL_NSICMSSECUREMESSAGE \
  66.   NS_IMETHOD GetCertByPrefID(const char *certID, char **_retval); \
  67.   NS_IMETHOD DecodeCert(const char *value, nsIX509Cert **_retval); \
  68.   NS_IMETHOD SendMessage(const char *msg, const char *cert, char **_retval); \
  69.   NS_IMETHOD ReceiveMessage(const char *msg, char **_retval); 
  70.  
  71. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  72. #define NS_FORWARD_NSICMSSECUREMESSAGE(_to) \
  73.   NS_IMETHOD GetCertByPrefID(const char *certID, char **_retval) { return _to GetCertByPrefID(certID, _retval); } \
  74.   NS_IMETHOD DecodeCert(const char *value, nsIX509Cert **_retval) { return _to DecodeCert(value, _retval); } \
  75.   NS_IMETHOD SendMessage(const char *msg, const char *cert, char **_retval) { return _to SendMessage(msg, cert, _retval); } \
  76.   NS_IMETHOD ReceiveMessage(const char *msg, char **_retval) { return _to ReceiveMessage(msg, _retval); } 
  77.  
  78. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  79. #define NS_FORWARD_SAFE_NSICMSSECUREMESSAGE(_to) \
  80.   NS_IMETHOD GetCertByPrefID(const char *certID, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertByPrefID(certID, _retval); } \
  81.   NS_IMETHOD DecodeCert(const char *value, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodeCert(value, _retval); } \
  82.   NS_IMETHOD SendMessage(const char *msg, const char *cert, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendMessage(msg, cert, _retval); } \
  83.   NS_IMETHOD ReceiveMessage(const char *msg, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReceiveMessage(msg, _retval); } 
  84.  
  85. #if 0
  86. /* Use the code below as a template for the implementation class for this interface. */
  87.  
  88. /* Header file */
  89. class nsCMSSecureMessage : public nsICMSSecureMessage
  90. {
  91. public:
  92.   NS_DECL_ISUPPORTS
  93.   NS_DECL_NSICMSSECUREMESSAGE
  94.  
  95.   nsCMSSecureMessage();
  96.  
  97. private:
  98.   ~nsCMSSecureMessage();
  99.  
  100. protected:
  101.   /* additional members */
  102. };
  103.  
  104. /* Implementation file */
  105. NS_IMPL_ISUPPORTS1(nsCMSSecureMessage, nsICMSSecureMessage)
  106.  
  107. nsCMSSecureMessage::nsCMSSecureMessage()
  108. {
  109.   /* member initializers and constructor code */
  110. }
  111.  
  112. nsCMSSecureMessage::~nsCMSSecureMessage()
  113. {
  114.   /* destructor code */
  115. }
  116.  
  117. /* string getCertByPrefID (in string certID); */
  118. NS_IMETHODIMP nsCMSSecureMessage::GetCertByPrefID(const char *certID, char **_retval)
  119. {
  120.     return NS_ERROR_NOT_IMPLEMENTED;
  121. }
  122.  
  123. /* nsIX509Cert decodeCert (in string value); */
  124. NS_IMETHODIMP nsCMSSecureMessage::DecodeCert(const char *value, nsIX509Cert **_retval)
  125. {
  126.     return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128.  
  129. /* string sendMessage (in string msg, in string cert); */
  130. NS_IMETHODIMP nsCMSSecureMessage::SendMessage(const char *msg, const char *cert, char **_retval)
  131. {
  132.     return NS_ERROR_NOT_IMPLEMENTED;
  133. }
  134.  
  135. /* string receiveMessage (in string msg); */
  136. NS_IMETHODIMP nsCMSSecureMessage::ReceiveMessage(const char *msg, char **_retval)
  137. {
  138.     return NS_ERROR_NOT_IMPLEMENTED;
  139. }
  140.  
  141. /* End of implementation class template. */
  142. #endif
  143.  
  144. #define NS_CMSSECUREMESSAGE_CONTRACTID "@mozilla.org/nsCMSSecureMessage;1"
  145.  
  146. #endif /* __gen_nsICMSSecureMessage_h__ */
  147.